package org.simp.core.head;

import java.util.Map;

import org.simp.exception.SimpIncompleteException;

/**
 * SIMP 消息头部
 * @author Administrator
 *
 */
public interface SimpHeader {

	public void setSrcAddress(String srcAddress);
	
	public void setObjAddress(String objAddress);
	
	public String getSrcAddress();
	
	public String getObjAddress();
	
	public void setMainId(short mainId);
	
	public short getMainId();
	
	public void setMoudleId(short moudleId);
	
	public short getMoudleId();
	
	public int getRequestId();
	
	public void setRequestId(int requestId);
	
	public String getVersion();
	
	public void setVersion(String version);
	
	public int getSerial();
	
	public void setSerial(int serial);
	
	public int getContentLength();
	
	public void setContentLength(int contentLength);
	
	public String getHeadParam(String key);
	
	public void setHeadParam(String key,String value);
	
	public byte[] encode()  throws SimpIncompleteException;
	
	public void decode(byte[] data)  throws SimpIncompleteException;
	
	public void setHeadParam(Map<String,String> paramMap);
	
	public Map<String,String> getHeadParam();
	
	public void setMsgType(byte msgType);
	
	public byte getMsgType();
}
